package puppy.graph;

import java.util.Enumeration;
import java.util.Hashtable;

import edu.uci.ics.jung.graph.UndirectedSparseGraph;

public class DeliciousNode {

	/**
	 * @param args
	 */

	
	//public Hashtable<String, Integer> freq_type= new Hashtable<String,Integer>(); 
	//private Integer id=null; // good coding practice would have this as private
	//String id2=null;
	private boolean type = true; // 0 for tag, 1 for url, null for user
	
	public Hashtable<String,Integer> freqs= new Hashtable<String,Integer>();
	private float prob=0.0f;
	private float prob_adults=0.0f;
	
	public float getProb_adults() {
		return prob_adults;
	}


	public void setProb_adults(float prob_adults) {
		this.prob_adults = prob_adults;
	}

	private boolean topic=false;
	
	//private short type_encode = 0;
	private String name=null;
	public String getName() {
		return name;
	}

	
	public boolean getType(){return type;}


	public void setName(String name) {
		this.name = name;
	}

	
	public boolean isTag(){ if(!type) return true; return false;}
	//public Hashtable<String, Integer> getFreq_type() {
	//	return freq_type;
//	}

	//public void setFreq_type(Hashtable<String, Integer> freq_type) {
	//	this.freq_type = freq_type;
//	}

//	public void setId(Integer id) {
//		this.id = id;
	//}


	
	

	private String age = "";

	public String getAge() {

		return age;
	}

	public void setAge(String age) {
		this.age = age;

	}

//	public int getId() {
//		return id;
//	}

//	public void setId(int id) {
//		this.id = id;
//	}

	public boolean isType() {
		return type;
	}

	public void setType(boolean type) {
		this.type = type;
	}

	//public short getType_encode() {
	//	return type_encode;
	//}

	//public void setType_encode(short typeEncode) {
	//	type_encode = typeEncode;
	//}

	/*public int getFreqTotal() {
		
		Enumeration<String> keys = freq_type.keys();
		int freq=0;
		while(keys.hasMoreElements()){
			
			String key =keys.nextElement();
			freq = freq + freq_type.get(key);
			
			
		}
		return freq;
	}*/

	
	
	
	/*public int getFreq(String type) {
		
		if(!freq_type.containsKey(type)) {
			return 0;
		}
		else{
			return  freq_type.get(type);
		}
		
		
	}*/
	
	/*public void setFreq(int freq, String type) {
		
		freq_type.put(type,freq);
		
		
		
	}*/


//	public DeliciousNode(int id) {
	//	this.id = id;
//	}
	
	public DeliciousNode() {
		
	}
	
	


	public float getProb() {
		return prob;
	}


	public void setProb(float prob) {
		this.prob = prob;
	}


	public boolean isTopic() {
		return topic;
	}


	public void setTopic(boolean topic) {
		this.topic = topic;
	}


	public String toString() { // Always a good idea for debuging
		return  name;
		// JUNG2 makes good use of these.
	}

	
	/*public void printFreqType(){
		
		
		Enumeration<String> iter = freq_type.keys();
		System.out.println("Printing freq_type:" + freq_type.size());
		while(iter.hasMoreElements()){
			
			String key = iter.nextElement();
			System.out.println(name +"\t"+ key + "\t" + freq_type.get(key));
		}
		
	}*/
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
